Embodiments of the present invention relate to text and graphical data user interfaces. More particularly, embodiments of the present invention relate to displaying and scrolling a hierarchical data structure.
Modern computers and data processing devices typically utilize displays such as CRT""s (Cathode Ray Tubes) and LCD""s (Liquid Crystal Displays) to display text and graphics data. A user interacts with an application program that allows the creation, viewing and/or editing of a data file or document on the display device.
Data files or documents often contains a large amount of text and graphics data that cannot be displayed simultaneously on a display. Examples of documents include word processing documents, spread sheet documents, e-mail documents, etc. For example, many application programs produce display output in a format known as WYSISYG (What You See Is What You Get), which produces a screen display substantially identical to a printed output. WYSIWYG output may include text o varying font sizes, types, etc using a variety of formatting. Because a data file rendered according to WYSIWYG typically occupies many pages, only a portion of the document can be displayed at one time.
Computing devices typically can execute a technique known as scrolling to permit a user to navigate through a document. Scrolling is an operation in which a user issues commands to a computing device to instruct it to display a particular portion of data on a display. The user scrolls a document by issuing commands through a keyboard or mouse.
Known scrolling controls include a scroll bar, consisting of an icon displayed on the display, that allows the user to instruct the computer (via a pointing device such as a mouse) to display a different portion of the document. Conventional scrolling controls provide a wide range of functionality, typically allowing the user to scroll data up, down, left or right.
FIG. 1A shows a conventional user interface with scrolling functionality. Typically the user interface depicted in FIG. 1A may be implemented in a windows environment but can also be applicable to a non-windows environment. In one embodiment, the conventional user interface is a graphical user interface (GUI). The user interface depicted in FIG. 1A includes an arrangement of control icons for performing scrolling operations. Window 105 consists of a display area 110, left scrolling button 150, right scrolling button 170, horizontal scroll bar 160, up scrolling button 120, down scrolling button 140, and vertical scroll bar 130. When a user selects any of left scrolling button 150, right scrolling button 170, up scrolling button 120 or down scrolling button 140 by clicking on the respective scrolling button using a mouse, window 105 scrolls in the respective direction. The scrolling windows includes portions of data 14-26. The position of the horizontal scroll bar 160 showing that additional data can be displayed to the left and the right, and the position of the vertical scroll bar 130 showing that additional data can be displayed to the top and the bottom. The user may also scroll window 105 by clicking and dragging horizontal scroll bar 160 or vertical scroll bar 130 in the desired direction of scrolling.
FIG. 1B illustrates a known layout of a conventional user interface in relationship to an underlying data file or document 210. Document 210 contains text or graphics data that cannot be practicably displayed within display area 110 of window 105, e.g., data 11-31. Thus, typically only a portion of the data of document 210 is displayed within display area 110 of window 105, e.g., portions of data 14-26.
Known scrolling methods are not sensitive to the structure of the data to be displayed. Data is often implicitly or explicitly structured hierarchically. For example, a word processing document of a book can be divided into a set of chapters, each chapter further divided into a number of subsections, and so on. A hierarchical relationship inherent in a set of data can be represented using a tree data structure that consists of a set of parent and child nodes, each node corresponding to a particular data object. For example, using the prior example of a book word processing document, the data could be represented using multiple trees, with each chapter comprising a root node of a distinct tree data structure. Each section within a chapter could be represented as a child node of the root. Furthermore, each subsection could be represented as a child node of a corresponding section child node, and so on. In another embodiment, a book document could contain a book root node with the chapters being child nodes of the book root node.
FIG. 2 shows a diagram depicting an example of a tree data structure. Tree 205 includes root node 210, non-terminal nodes 215, and terminal (i.e., leaf) nodes 220 arranged in a parent-child structure. Root node 210 is the ancestor of every node in tree 205. Non-terminal nodes 215 are typically characterized as having an ancestor node and at least one child node. Terminal nodes 220 are typically characterized as having an ancestor node and no child nodes.
Due to limitations of conventional scrolling methods a display output may not show pertinent hierarchical relationships, which can result in confusion and inefficiency for the user. For example, when perusing hierarchical data it can be advantageous that the hierarchical structure of data be conveyed to the user. For example, a text document may consist of a number of headers, each header associated with a set of subordinate body lines. An example of this structure is a newspaper document, consisting of a set of headlines (headers) and corresponding body lines correspond to the text pertaining to each particular headline. If a user were to peruse a paper newspaper, and a story were continued from the front page to an inner page, the inner page would typically contain the headline text at an appropriate position where the story was continued so that the user could quickly move to this section. However, if a user were to scroll a document containing a new articles using conventional scrolling methods, the body of the news story can be displayed without the corresponding headline when the headline has been scrolled off of the display.
FIG. 3 illustrates a display of data in a conventional scrolling user interface. Display area 310 shows data including first data header 310, second data header 320, and third data header 330. Below first data header 310 is displayed subordinate data 311-314, below second data header 320 is displayed subordinate data 321-325, and below third data header 330 is displayed subordinate data 331-334. Each of header data headers 310, 320, 330, together with their respective subordinate data, correspond to an underlying hierarchical tree structure, 301-303. FIG. 3 does not include information indicating what proportion of the subordinate data of a data header is currently displayed (e.g., whether data header 330 only has subordinate data 331-334, or whether data header 330 has additional subordinate data in addition to subordinate data 331-334).
FIG. 5 illustrates the hierarchical relationship of the data displayed in FIGS. 3-4. Specifically, data trees 301-304 of FIG. 5 respectively contain root nodes 310-340. Root nodes 310-340 respectively correspond to the data headers 310-340 of FIGS. 3-4. Data trees 301-304 of FIG. 5 respectively contain a set of child leaf nodes 311-314, 321-325, 331-335, and 340-344. FIGS. 3-4 display varied portions of the data headers 310-340 and subordinate data 311-314, 321-325, 331-335, and 340-344 corresponding to the root nodes 310-340 and child leaf nodes 311-314, 321-325, 331-335, and 340-344 of FIG. 5.
FIG. 4 illustrates a display of data in a conventional scrolling user interface after a three line vertical scrolling operation with respect to the display of data in FIG. 3. For example, FIG. 4 illustrates a display of data after the user has scrolled the display up three lines, either by moving the scroll bar 130 down or by clicking on the down scroll button 140. After a conventional scrolling operation, the header 310 corresponding to tree structure 301 is no longer visible in display area 310. Accordingly, data 313-14 are displayed without their corresponding header 310. When header 310 contains pertinent information related to subordinate data 313-314, the user does not have access to this pertinent information in the display area, thereby limiting the usefulness of the conventional user interface. While the data header and certain of the subordinate data corresponding to tree structure 301 is no longer visible, a portion of the data of tree structure 304 is now visible in display area 310 including data header 340 and subordinate data 341. FIG. 4 does not include information indicating what proportion of the subordinate data of a data header is currently displayed (e.g., whether data header 340 has any subordinate data beyond subordinate data 341, etc., what proportion of subordinate data of a data head that subordinate data 313-314 comprise, etc.). In view of the foregoing, it can be appreciated that a substantial need exists for methods and apparatus which can advantageously display and scroll hierarchical data.
Embodiments of the present invention include methods and apparatus to scroll a displayed hierarchical data structure. A hierarchical data structure can include a first parent node and a plurality of child nodes of the parent node, and the plurality of subordinate nodes can include a first child node and a second child node. The first parent node can be displayed in a first position of a display area. The first child node can be displayed in a second position of the display area, with the second position being adjacent the first position. The second child node can be displayed in the display area. A first instruction to scroll at least the second child node in a direction toward the first position can be received, and the second child node can be displayed in the second position.